package kr.hkit.powerjava.chapter24.work2;

import java.util.Scanner;

import kr.hkit.powerjava.chapter24.work2.dao.DepartmentDao;
import kr.hkit.powerjava.chapter24.work2.dao.StudentDao;
import kr.hkit.powerjava.chapter24.work2.service.DepartmentService;
import kr.hkit.powerjava.chapter24.work2.service.StudentService;

public class ERP {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		boolean flag = true;
		while (flag) {
			System.out.println("1. 학생정보 2. 부서정보 3. 종료");
			switch(sc.nextInt()){
				case 1:
					new StudentService(new StudentDao(), sc);
					break;
				case 2:
					new DepartmentService(new DepartmentDao(), sc);
					break;
				default:
					flag = false;
					sc.close();
			}
		}
		
	}
}
